package cn.b.sky.mes.cm.model;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;

import cn.b.sky.common.model.ImeCommon;
import cn.b.sky.common.model.TreeInterface;
import org.apache.commons.lang3.StringUtils;

/**
 * 
 * <strong>Title : WorkCenterType.java<br></strong>
 * <strong>Package : cn.b.sky.mes.cm.model<br></strong>
 * <strong>Description : </strong>工作中心类型实体<br> 
 * <strong>Create on : 2015-9-24 上午11:05:56<br></strong>
 * <p>
 * @author zhaoxin01<br>
 * @version <strong>v1.0.0</strong><br>
 * <br>
 * <strong>修改历史:</strong><br>
 * 修改人 | 修改日期 | 修改描述<br>
 * -------------------------------------------<br>
 * <br>
 * <br>
 */
public class WorkCenterType extends ImeCommon implements TreeInterface, Serializable {

  private static final long serialVersionUID = -6817504441514203549L;

  private String workCenterTypeCode;//工作中心类型编号

  private String parentTypeCode;//父级

  private String parentTypeText;//父级描述

  private String typeText;//类型描述

  private int lockFlag;

  private List<WorkCenterType> children = new ArrayList<WorkCenterType>();

  public String getParentTypeText() {
    return parentTypeText;
  }

  public void setParentTypeText(String parentTypeText) {
    this.parentTypeText = parentTypeText;
  }

  public List<WorkCenterType> getChildren() {
    return children;
  }

  public void setChildren(List<WorkCenterType> children) {
    this.children = children;
  }

  public String getWorkCenterTypeCode() {
    return StringUtils.upperCase(workCenterTypeCode);
  }

  public void setWorkCenterTypeCode(String workCenterTypeCode) {
    this.workCenterTypeCode = StringUtils.upperCase(workCenterTypeCode);
  }

  public String getParentTypeCode() {
    return StringUtils.upperCase(parentTypeCode);
  }

  public void setParentTypeCode(String parentTypeCode) {
    this.parentTypeCode = StringUtils.upperCase(parentTypeCode);
  }

  public String getTypeText() {
    return typeText;
  }

  public void setTypeText(String typeText) {
    this.typeText = typeText;
  }

  public int getLockFlag() {
    return lockFlag;
  }

  public void setLockFlag(int lockFlag) {
    this.lockFlag = lockFlag;
  }

  @Override
  public void setTrees(List trees) {
    this.children = trees;

  }

  @Override
  public String getPid() {
    return this.parentTypeCode;
  }

  @Override
  public String getNodeId() {
    return this.workCenterTypeCode;
  }

}
